toil in vain

Translations
трудиться напрасно
They toiled in vain, as the project was canceled.
Они трудились напрасно, так как проект был отменен.